package com.test.multithread.future;

import java.util.function.Function;

class FuncDemo {
    private static void method(Function<String, Integer> one, Function<Integer, Integer> two) {
        int num = one.andThen(two).apply("10");
        System.out.println(num + 20);
    }

    public static void main(String[] args) {
        method(str -> Integer.parseInt(str) + 30, i -> i = i * 10);
    }
}
